import { Entity, Column, Unique, Index, EntityRepository } from 'typeorm'
import { BaseEntity } from '../global'

@Entity('user_auth')
export class UserAuth extends BaseEntity {
    @Column({ length: 32, comment: 'snowflake id' })
    authid: string

    @Column({ length: 32, comment: 'userid' })
    userid: string

    @Column({ length: 128, comment: '设备唯一ID' })
    devid: string

    @Column({ length: 128, nullable: true, comment: '鉴权IP' })
    authIp: string

    @Column({ length: 32, comment: '鉴权依据值' })
    authAccount: string

    @Column('int', { comment: '鉴权类型，0游客1手机2账密3微信4QQ' })
    authType: number

    @Column('int', { comment: '鉴权结果, 0失败1成功' })
    authStatus: number
}
